﻿using CPPEI.Coolzon.Common;
using CPPEI.Coolzon.Service.Contract;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.Coolzon.UI.Views.EventProxies
{
    public class RespLoopSceneHandler : BaseResponseHandler<RespLoopSceneData>
    {
        protected override void OnHandle(RemoteEventProxy remoteEventProxy, ServiceProxy.MainServiceRef.Response response, RespLoopSceneData responseData)
        {
            if (UIContext.Current.AppType.ToUpper() == "DISPLAYAPP" && !UIContext.Current.IsUnderControl)
            {
                // 展示端且不在控制模式下，不处理来自服务器的事件
                return;
            }

            remoteEventProxy.RenderView.LoopScene(responseData.Direction, responseData.OffsetDelta);
        }
    }
}
